//
//  MovieLatticeViewCell.m
//  豆瓣
//
//  Created by dllo on 15/11/4.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "MovieLatticeViewCell.h"
#import "UIImageView+WebCache.h"
@implementation MovieLatticeViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews
{
    self.headImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 135)];
    [self.contentView addSubview:self.headImageView];
    [self.headImageView release];
    
    
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 135, 105, 25)];
    [self.contentView addSubview:self.nameLabel];
    [self.nameLabel release];
    
}

- (void)setMovieL:(Movie *)movieL
{
    if (_movieL != movieL) {
        [_movieL release];
        _movieL = [movieL retain];
    }
    self.nameLabel.text = self.movieL.movieName;
    
    NSURL *url = [NSURL URLWithString:self.movieL.pic_url];
    
    [self.headImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"placeHoderImage.png"]];
    
}


@end
